package com.ranyk.www.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * CLASS_NAME: User.java <br/>
 *
 * @author ranyk           <br/>
 * @version V1.0           <br/>
 * @decription: cms_user 数据表实体类  <br/>
 * @date: 2022-04-03 <br/>
 */
@Data
@TableName("cms_user")
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "cms_user 数据表实体类")
public class AdminUser extends Model<AdminUser> {


    @Serial
    private static final long serialVersionUID = -5676803853521924156L;

    /**
     * 管理员ID
     */
    @ApiModelProperty(value = "管理员ID",hidden = true)
    @TableId(value = "user_id", type = IdType.AUTO)
    private Long userId;
    /**
     * 组织ID
     */
    @TableField("organization_id")
    @ApiModelProperty(value = "组织ID",hidden = true)
    private Long organizationId;
    /**
     * 管理员账号
     */
    @TableField("login_name")
    @ApiModelProperty(value = "管理员账号",hidden = true)
    private String loginName;
    /**
     * 管理员密码
     */
    @TableField("login_password")
    @ApiModelProperty(value = "管理员密码",hidden = true)
    private String loginPassword;
    /**
     * 加密密码的盐
     */
    @TableField("salt")
    @ApiModelProperty(value = "加密密码的盐",hidden = true)
    private String salt;
    /**
     * 昵称
     */
    @TableField("user_name")
    @ApiModelProperty(value = "昵称",hidden = true)
    private String userName;
    /**
     * 真实姓名
     */
    @TableField("real_name")
    @ApiModelProperty(value = "真实姓名")
    private String realName;
    /**
     * 性别 0=保密/1=男/2=女
     */
    @TableField("sex")
    @ApiModelProperty(value = "性别")
    private Integer sex;
    /**
     * 年龄
     */
    @TableField("age")
    @ApiModelProperty(value = "年龄")
    private Integer age;
    /**
     * 用户头像
     */
    @TableField("pic_img")
    @ApiModelProperty(value = "用户头像地址",hidden = true)
    private String picImg;
    /**
     * 状态 0=冻结/1=正常
     */
    @TableField("status")
    @ApiModelProperty(value = "状态, 0: 冻结; 1: 正常;",hidden = true)
    private Integer status;
    /**
     * 电子邮箱
     */
    @TableField("email")
    @ApiModelProperty(value = "邮件")
    private String email;
    /**
     * 手机号码
     */
    @TableField("telephone")
    @ApiModelProperty(value = "手机号码")
    private String telephone;
    /**
     * 最后登录时间
     */
    @TableField("last_login_time")
    @ApiModelProperty(value = "最后登录时间",hidden = true)
    private Date lastLoginTime;
    /**
     * 最后登录IP
     */
    @TableField("last_login_ip")
    @ApiModelProperty(value = "最后登录IP",hidden = true)
    private String lastLoginIp;
    /**
     * 创建时间
     */
    @TableField("create_time")
    @ApiModelProperty(value = "账号创建时间",hidden = true)
    private Date createTime;
    /**
     * 创建者
     */
    @TableField("create_by")
    @ApiModelProperty(value = "创建者",hidden = true)
    private String createBy;
    /**
     * 更新时间
     */
    @TableField("update_time")
    @ApiModelProperty(value = "更新时间",hidden = true)
    private Date updateTime;
    /**
     * 更新者
     */
    @TableField("update_by")
    @ApiModelProperty(value = "更新者",hidden = true)
    private String updateBy;

    @Override
    public Serializable pkVal() {
        return this.userId;
    }

}
